﻿using Ewell.Interface.Common.Model.Common;
using Ewell.Interface.Common.Model.Constant;
using Ewell.Interface.Common.Model.GateWay.Dto.Athena;
using System;

namespace Ewell.Interface.Common.Model.GateWay.GateWayUriInfo
{
    public class UserDubboService : GateWayUri
    {
        public override string url => "dubbo/cc.ewell.his.athena.service.inter.dubbo.UserDubboService";
        /// <summary>
        /// 三方登录
        /// </summary>
        public GateWayMethod thirdLogin => new ThirdLogin(url);
        /// <summary>
        /// 获取院区信息
        /// </summary>
        public GateWayMethod getHospitalInfo => new GetHospitalInfo(url);
        /// <summary>
        /// 登录
        /// </summary>
        public GateWayMethod login => new Login(url);
        /// <summary>
        /// 获取权限列表
        /// </summary>
        public GateWayMethod getAthenaList => new GetAthenaList(url);
    }

    public class ThirdLogin : GateWayMethod
    {
        public ThirdLogin(string baseUrl) : base(baseUrl)
        {
        }

        public override string methodName => "thirdLogin";

        public override string paramClass => "cc.ewell.his.athena.upon.req.ThirdLoginRequest";

        public override DubboParamType paramType => DubboParamType.defaultParam;

        public override Type requestParamType => typeof(ThirdLoginRequest);

        public override Type responseParamType => typeof(UUHeader);

        public override string desc => "[三方登录]";
    }

    public class GetHospitalInfo : GateWayMethod
    {
        public GetHospitalInfo(string baseUrl) : base(baseUrl)
        {
        }

        public override string methodName => "getHospitalInfo";

        public override string paramClass => "co.faao.plugin.transmission.request.MessageHeader";

        public override DubboParamType paramType => DubboParamType.messageheader;

        public override Type requestParamType => typeof(GetHospitalInfoRequest);

        public override Type responseParamType => typeof(CloudUserResp);

        public override string desc => "[获取院区]";
    }

    public class Login : GateWayMethod
    {
        public Login(string baseUrl) : base(baseUrl)
        {
        }

        public override string methodName => "login";

        public override string paramClass => "co.faao.plugin.transmission.request.MessageHeader";

        public override DubboParamType paramType => DubboParamType.messageheader;

        public override Type requestParamType => typeof(LoginRequest);

        public override Type responseParamType => typeof(User);

        public override string desc => "[登录]";
    }

    public class GetAthenaList : GateWayMethod
    {
        public GetAthenaList(string baseUrl) : base(baseUrl)
        {
        }

        public override string methodName => "getAthenaList";

        public override string paramClass => "co.faao.plugin.transmission.request.MessageHeader";

        public override DubboParamType paramType => DubboParamType.messageheaderDoamin;

        public override Type requestParamType => typeof(LoginRequest);

        public override Type responseParamType => typeof(AthenaResp);

        public override string desc => "[获取权限列表]";
    }
}
